package 代码记录.校招笔试真题.笔试真题_2023.齐治科技;

import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Scanner;
import java.util.Set;

/**
 * @author zx
 * @create 2023-02-26 11:46
 * 这笔试题是不筛选人的吧！
 */
public class Test {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String line = scanner.nextLine();
        Map<Character, Integer> map = new LinkedHashMap<Character, Integer>();

        //write your code here......
        for(int i = 0;i < line.length();i++){
            char c = line.charAt(i);
            if(c >= 'a' && c <= 'z'){
                if(map.containsKey(c)){
                    map.put(c,map.get(c) + 1);
                }else{
                    map.put(c,1);
                }
            }else if(c >= 'A' && c <= 'Z'){
                if(map.containsKey(c)){
                    map.put(c,map.get(c) + 1);
                }else{
                    map.put(c,1);
                }
            }
        }
        Set<Map.Entry<Character, Integer>> entrys = map.entrySet();
        for (Map.Entry<Character, Integer> entry : entrys) {
            System.out.println(entry.getKey() + ":" + entry.getValue());
        }
    }
}
